package zdream.utils.math;

/**
 * @author Zdream
 * @date 2023-12-24
 * @since 0.0.1
 */
public class IntRectangle {
	public int x, y, width, height;

	public IntRectangle() {
	}

	public IntRectangle(int x, int y, int width, int height) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
	}

	public IntRectangle(IntRectangle rect) {
		x = rect.x;
		y = rect.y;
		width = rect.width;
		height = rect.height;
	}

	public IntRectangle withX(int x) {
		this.x = x;
		return this;
	}

	public IntRectangle withY(int y) {
		this.y = y;
		return this;
	}

	public IntRectangle withWidth(int width) {
		this.width = width;
		return this;
	}

	public IntRectangle withHeight(int height) {
		this.height = height;
		return this;
	}
}
